package xyz.larkin.common.api;

import java.util.List;

/**
 * Created by liujin on 2019/1/3.
 *
 * @description redis基础服务接口
 */
public interface RedisService {
    boolean set(String key, String value, int seconds);

    String get(String key);

    Long del(String key);

    Long delAll(String pattern) throws Exception;

    Long addList(String key, String... value);
    List<String> getList(String key, int start, int end);
    Long removeList(String key, int times, String value);
    String removeList(String key, int start, int end);

    //升序降序
    List<String> sortList(String key, boolean isDesc);
}
